<template>
  <div class="course-tag-wrapper">
    <i>{{ txt }}</i>
  </div>
</template>
<script>
import * as CONSTANTS from '@/constants/index'

export default {
  props: {
    type: {
      type: String,
      default: CONSTANTS.VAR_RECOMMENDITEMTYPE_COURSE,
      required: true,
    },
  },
  components: {},
  data() {
    return {
      CONSTANTS: Object.freeze(CONSTANTS),
    }
  },
  computed: {
    txt() {
      switch (this.type) {
        case CONSTANTS.VAR_RECOMMENDITEMTYPE_TOY:
          return CONSTANTS.LABEL_TOY_TAG

        default:
          return CONSTANTS.LABEL_COURSE_TAG
      }
    },
  },
  mounted() {},
  filters: {},
  watch: {},
  methods: {},
}
</script>

<style lang="less" scoped>
.course-tag-wrapper {
  // min-height: 100%;
  width: 42px;
  height: 20px;
  background-color: #ff6666;
  // border-radius: 8px;
  border-top-left-radius: 8px;
  border-bottom-right-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  & > i {
    font-style: normal;

    line-height: 13px;
    font-family: 'SourceHanSansCN-Regular';
    font-size: 13px;
    font-weight: normal;
    font-stretch: normal;
    letter-spacing: 0px;
    color: #ffffff;
  }
}
</style>
